<?php
/**
 * return language data
 * @author adrian
 *
 */
class Core_Data_Language {
	
	/**
	 * database handler
	 * 
	 * @var database
	 */
	private $database;
	
	/**
	 * constructor
	 */
	public function __contruct(){
		
		$this->database = new Core_Driver_MysqlImproved();
		
	}
	
	/**
	 * return language data
	 * 
	 * @return multitype:string $languageData
	 */
	public function getLanguageData(){
		
		$this->database->connect();
		
		$this->database->prepare(
			"
				SELECT
				language.language_name,
				language.language_description
				FROM
				language
				ORDER
				BY
				language.language_name
				ASC
				;
				"
		);
		
		$this->database->query();
		
		$languageData = array();
		
		while($data = $this->database->fetch('array')){
			
			$languageData[$data['language_name']] = $data['language_name'] . " - " . $data['language_description'];
			
		}
		
		return $languageData;
	}
	
	
	
}